package com.hubeiweb.controller;

import com.hubeiweb.pojo.User;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;

public class TwoController implements Controller {

    @Override
    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
        List<User> list=new ArrayList<>() ;
        list.add(new User(1,"张三","男"));
        ModelAndView mav = new ModelAndView();
        mav.setViewName("/WEB-INF/jsp/one.jsp");
        try{
            Thread.sleep(5000);
        }catch (Exception e){
            e.printStackTrace();
        }
        return mav;
    }
}
